package com.jzoffer2;

import java.util.Scanner;

/**
 * TODO
 *
 * @author lefly
 * @version 1.0
 * @classname No10_1
 * @description
 * @date 2021/1/30 下午5:51
 */
public class No10_1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int res = fib(n);
        System.out.println(res);

    }

    public static int fib(int n) {
        if(n <= 1){
            return n;
        }
        int pre = 0,cur = 1,res = 0;
        for(int i = 2;i <= n;i++){
            res = pre + cur;
            res %= 1000000007;
            pre = cur;
            cur = res;
        }
        return res;
    }



}
